﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="consumsrecipients.aspx.cs"
    Inherits="LabMS.Web.Equipment.Consum.consumrecipients" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>耗材领用</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->

    <script src="../../js/calendar5.js" type="text/javascript"></script>

    <script type="text/javascript">        
        var c = new Calendar("c");
        document.write(c);
   
      function OpenEditWin(frmWin,width,height,obj1, obj2) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            { 
                document.getElementById(obj1).value = ret[0];
                document.getElementById(obj2).value = ret[1];
            }  
      }
     
     //1:编号，2:名称 3:分类号 4:库存数量 5:单价
     function OpenEditWin2(frmWin,width,height,obj1, obj2,obj3,obj4,obj5) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            { 
                document.getElementById(obj1).value = ret[0];
                document.getElementById(obj2).value = ret[1];
                document.getElementById(obj3).value = ret[2];
                document.getElementById(obj4).value = ret[3];
                document.getElementById(obj5).value = ret[4];
            }  
      } 
     
     function LabChange()
     {
        Url = "../../CommonPage/consumselectlist.aspx";
        Url = Url + "?type=xiaohaopin&location=" + document.getElementById("tbLocationCode").value;
        document.getElementById("tbUrl").value = Url;
     } 
    </script>

</head>
<body onload="LabChange()" class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        耗材领用</label>
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <asp:Button ID="Submit" CssClass="button" runat="server" Text="领用" OnClick="Submit_Click" /></p>
            <table border="0" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用仓库:</label></td>
                    <td>
                        <asp:TextBox ID="tbLocation" runat="server" MaxLength="40"></asp:TextBox>
                        <input id="btnWindowsLcoation" onclick="OpenEditWinOther('../Common/Location.aspx',600,400)"
                            type="button" value="..." class="button" />      
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            编 &nbsp; &nbsp; 号:</label></td>
                    <td>
                        <asp:TextBox ID="tbCNub" runat="server"></asp:TextBox><font style="color: Red">*</font>
                        <input id="tbUrl" runat="server" style="display: none" type="text" />
                        <input id="tbUintPrice" runat="server" style="display: none" type="text" />
                        <input onclick="LabChange();OpenEditWin2(document.getElementById('tbUrl').value,500,400,'tbCNub', 'lbCName','lbTypeNub','lbAllNub','tbUintPrice')"
                            type="button" value="..." class="button" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            名 &nbsp; &nbsp; 称:</label></td>
                    <td>
                        <asp:TextBox ID="lbCName" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            分 类 号:</label></td>
                    <td>
                        <asp:TextBox ID="lbTypeNub" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            库存数量:</label></td>
                    <td>
                        <asp:TextBox ID="lbAllNub" runat="server" Text=""></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            使用方向:</label></td>
                    <td>
                        <asp:DropDownList ID="ddlArrow" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用数量:</label></td>
                    <td>
                        <asp:TextBox ID="tbUserNub" runat="server"></asp:TextBox><font style="color: Red">*</font></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领 用 人:</label></td>
                    <td>
                        <asp:TextBox ID="tbRPersion" runat="server"></asp:TextBox><span style="color: Red">*</span>
                        <input id="tbRPersionCode" runat="server" style="display: none" type="text" />
                        <input onclick="OpenEditWin('../../CommonPage/TeacherList.aspx',500,400,'tbRPersionCode', 'tbRPersion')"
                            type="button" value="..." class="button" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            实 验 室:</label></td>
                    <td>
                        <asp:TextBox ID="tbLabName" runat="server"></asp:TextBox><span style="color: Red">*</span>
                        <input id="tbLabCode" runat="server" style="display: none" type="text" />
                        <input onclick="OpenEditWin('../../CommonPage/LabList.aspx',500,400,'tbLabCode', 'tbLabName')"
                            type="button" value="..." class="button" /></td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            领用时间:</label></td>
                    <td>
                        <asp:TextBox ID="tbRecipientsDate" runat="server"></asp:TextBox><span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label class="itemTitle">
                            备 &nbsp; &nbsp;注:</label></td>
                    <td>
                        <asp:TextBox Rows="3" TextMode="MultiLine" ID="tbRemarks" runat="server"></asp:TextBox></td>
                </tr>
            </table>
            <asp:Label ID="lbErr" runat="server" ForeColor="Red" Text="Err" Visible="False"></asp:Label>
           <div style="display: none">
            <asp:TextBox ID="tbLocationCode" runat="server"></asp:TextBox>
        </div> 
           <script type="text/javascript">

        function OpenEditWinOther(frmWin,width,height) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            {
                document.getElementById("tbLocation").value = ret[1];
                document.getElementById("tbLocationCode").value = ret[0];
            }  
      } 
    </script> 
        </div>
    </form>
</body>
</html>
